xen/x86/shadow: adjust barriers around gtable_dirty_version.
authorTim Deegan <tim@xen.org>
Fri, 18 Aug 2017 14:23:44 +0000 (15:23 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 18 Aug 2017 18:29:47 +0000 (19:29 +0100)
commit82d510c88dc12c8aa31aa97bab633b922737bdf4
treec102f22d72fb513e888afe78fa66a0f82a7b08f2
parent7f86858186f4932ceba91f731337e0ef536d6cd0
xen/x86/shadow: adjust barriers around gtable_dirty_version.

Use the smp_ variants, as we're only synchronizing against other CPUs.

Add a write barrier before incrementing the version.

x86's memory ordering rules and the presence of various out-of-unit
function calls mean that this code worked OK before, and the barriers
are mostly decorative.

Signed-off-by: Tim Deegan <tim@xen.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/shadow/multi.c